# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 6
_modified_time = 1317990304.192575
_template_filename=u'/home/wolfking/workspace/tornado/Soy/application/views/layouts/content.html'
_template_uri=u'/layouts/content.html'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from whirlwind.view.filters import Filters, Cycler
_exports = ['body', 'rhs', 'jquery_script', 'user_script']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/layouts/htmlPage.html', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        __M_writer = context.writer()
        # SOURCE LINE 2
        __M_writer(u'\n\n')
        # SOURCE LINE 17
        __M_writer(u'\n\n\n')
        # SOURCE LINE 48
        __M_writer(u'\n\n')
        # SOURCE LINE 73
        __M_writer(u'\n\n')
        # SOURCE LINE 76
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_body(context):
    context.caller_stack._push_frame()
    try:
        self = context.get('self', UNDEFINED)
        next = context.get('next', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 5
        __M_writer(u'\n\t')
        # SOURCE LINE 6
        runtime._include_file(context, u'/shared/flash_messages.html', _template_uri)
        __M_writer(u'\n        ')
        # SOURCE LINE 7
        runtime._include_file(context, u'/shared/header.html', _template_uri)
        __M_writer(u'\n        <div id="container">\n        <div id="lhs">\n            ')
        # SOURCE LINE 10
        __M_writer(unicode(next.lhs()))
        __M_writer(u'\n        </div>\n        <div id="rhs">\n            ')
        # SOURCE LINE 13
        __M_writer(unicode(self.rhs()))
        __M_writer(u'\n        </div>\n        </div>\n        ')
        # SOURCE LINE 16
        runtime._include_file(context, u'/shared/footer.html', _template_uri)
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_rhs(context):
    context.caller_stack._push_frame()
    try:
        username = context.get('username', UNDEFINED)
        __M_writer = context.writer()
        # SOURCE LINE 20
        __M_writer(u'\n')
        # SOURCE LINE 21
        if not username:
            # SOURCE LINE 22
            __M_writer(u'    <div id="user_login_header">User Account</div><!-- end user_login_header-->    \n    <form id="fm-log-in" action="/account/login" method="post">\n    <div id="field_username">\n        <strong>Email:</strong>\n            <input type="text" id="email" name="email"/>\n    </div>\n         \n    <div id="field_password">\n        <strong>Password:</strong>\n        <input type="password" id="password" name="password"/>\n    </div>\n    </form>\n    <button id="bt-log-in">log in</button>\n    <button id="bt-register">register</button>\n    <button id="bt-forget">forget</button>\n    <button id="bt-google">login via google?</button>\n')
            # SOURCE LINE 38
        else:
            # SOURCE LINE 39
            __M_writer(u'    <div id="user_login_header">User</div><!-- end user_login_header-->    \n    <div>\n    <div style="font-weight:bold; margin-bottom:10px;">Welcome back to Jiang You! ')
            # SOURCE LINE 41
            __M_writer(unicode(username))
            __M_writer(u'</div>\n        <button id="bt-log-out">Log Out</button>\n        <button id="bt-change_password">Change Password</button>\n        <button id="bt-profile">View Profile</button>\n    </div>\n')
            pass
        # SOURCE LINE 47
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_jquery_script(context):
    context.caller_stack._push_frame()
    try:
        __M_writer = context.writer()
        # SOURCE LINE 75
        __M_writer(u'\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_user_script(context):
    context.caller_stack._push_frame()
    try:
        __M_writer = context.writer()
        # SOURCE LINE 50
        __M_writer(u'\n        $("button#bt-forget").click(function(){\n            window.location.replace("/account/forgetpassword");\n        });\n        $("button#bt-register").click(function(){\n            window.location.replace("/account/signup");\n        });\n        $("button#bt-log-in").click(function(){\n            $("#fm-log-in").submit();\n        });\n        $("button#bt-google").click(function(){\n            window.location.replace("/account/googlelogin");\n        });\n\n        $("button#bt-log-out").click(function(){\n            window.location.replace("/account/logout");    \n        });\n        $("button#bt-change-password").click(function(){\n            window.location.replace("/account/changepassword");    \n        });\n        $("button#bt-profile").click(function(){\n            window.location.replace("/profile");    \n        });\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


